<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta charset="utf-8" />
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="320" name="MobileOptimized">

    <title>看看生物们</title>
    <link rel="stylesheet" type="text/css" href="css/lunbo.css">
    <link rel="stylesheet" type="text/css" href="css/rotation.css">
    <link rel="stylesheet" type="text/css" href="css/nav.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <link rel="stylesheet" type="text/css" href="css/myButton.css">
    <link rel="stylesheet" type="text/css" href="css/layout.css">
    <link rel="stylesheet" type="text/css" href="css/share.css">
    <link rel="stylesheet" type="text/css" href="css/link.css">
    <link rel="stylesheet" type="text/css" href="css/search.css">
    <link rel="stylesheet" type="text/css" href="css/shapes.css">
    <link rel="stylesheet" type="text/css" href="css/animation.css">
    <link rel="stylesheet" type="text/css" href="css/color.css">
    <link rel="stylesheet" type="text/css" href="css/square.css">
    <link rel="stylesheet" type="text/css" href="css/time.css">
    <link rel="stylesheet" type="text/css" href="css/login.css">
    <link rel="stylesheet" type="text/css" href="css/info.css">
    <link rel="stylesheet" type="text/css" href="css/font.css">
    <link type="text/css" href="css/font-awesome.min.css" rel="stylesheet">
    <style>
        .container {
            width: 1100px;
            max-width: 100%;
        }

        .container img {
            max-width: 100%;
        }

        @media only screen and (max-width: 480px) {
            /* //此适配不同手机型号下文字，图片的大小 */
            .bodyDom{
                width: 300px;
                font-size: 30px;
            }
        }

        @media only screen and (max-width: 375px) {

            /* //此适配不同手机型号下文字，图片的大小 */

        }
    </style>
    <!--    <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">-->

</head>

<body class="selection-blue bodyDom">
    <a id="top"></a>

    <a href="子网掩码.html">子网掩码</a>
    <a href="mod.html">mod</a>
    <a href="eyesight.html">eyesight</a>
    <br>
    <a href="https://www.rapidtables.org/zh-CN/convert/number/decimal-to-binary.html">十进制到二进制转换器</a>
    <!-- 十进制到二进制转换器
    https://www.rapidtables.org/zh-CN/convert/number/decimal-to-binary.html -->

    <br>
    <!-- D:\proj\js\animals-web\binSearch.html -->
    <a href="binSearch.html">binSearch</a>
    <br>

    <div id="gotop" class=" ">
        <!--    style="line-height:40px; text-align:center;"-->
        <a href="#top" class=" "> <i class="fa fa-arrow-up center-block hover-circle hover-rotate purple" title="回到顶部"
                style="width: 20px;height: 20px"></i></a>
    </div>

    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/strutil.js" type="text/javascript"></script>
    <script src="js/pushList.js" type="text/javascript"></script>
    <!--<script src="js/rotation.js" type="text/javascript"></script>-->
    <script src="js/button.js" type="text/javascript"></script>
    <script src="js/share.js" type="text/javascript"></script>
    <!-- <script src="js/time.js" type="text/javascript"></script> -->
    <!-- <script src="js/rotationNoCircle.js" type="text/javascript"></script> -->
    <script>
        window.addEventListener('message', function (event) {
            console.log("event");
            console.log(event);
            document.getElementById('message').innerHTML = "收到" +
                event.origin + "消息：" + event.data;
        }, false);
        // ————————————————
        // 版权声明：本文为CSDN博主「tang_yi_」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。
        // 原文链接：https://blog.csdn.net/tang_yi_/article/details/79401280

        function isTrueOutStack(inStack, outStack) {
            var stack = []
            var pushUntil = outStack[0]
            inStack = inStack.slice()
            outStack = outStack.slice()

            while (inStack.length > 0) {
                // push
                while (1) {
                    stack.push(inStack.shift())
                    if (stack[stack.length - 1] === pushUntil) break
                }

                // pop
                while (stack[stack.length - 1] === outStack[0]) {
                    // console.log(stack, outStack)
                    stack.pop()
                    outStack.shift()
                    if (stack.length <= 0) break
                }
                pushUntil = outStack[0]
            }

            if (stack.length === 0) return true
            return false
        }


        function isTrueOutStack2(inStack, outStack) { // 根据规律来判断
            if (inStack.length !== outStack.length) return false
            var result = true
            var indexs = new Map()
            inStack.forEach((item, index) => {
                indexs.set(item, index)
            })
            var tmp = [],
                index
            for (var i = 0; i < outStack.length - 1; i++) {
                tmp.length = 0
                index = indexs.get(outStack[i])
                for (var j = i + 1; j < outStack.length; j++) {
                    if (indexs.get(outStack[j]) >= index) continue
                    tmp.push(outStack[j])
                }
                // console.log(outStack[i], index, tmp)
                for (var k = 0; k < tmp.length - 1; k++) {
                    if (indexs.get(tmp[k]) < indexs.get(tmp[k + 1])) {
                        result = false
                        break
                    }
                }
            }
            return result
        }

        function sumFrom1(num = 15) {
            // let num=15
            let sum = 0;
            for (let i = 1; i <= num; i++) {
                sum += i
            }
            return sum
        }

        let sumFrom1To15 =
            sumFrom1(15)
        console.log("sumFrom1To15");
        console.log(sumFrom1To15);
        // sumFrom1To15
        // index.html:308 120

        // （1+2 +3.。。15）/20*1/20

        // 120
        // js 根据入栈序列判断可能的出栈序列_晔晔炅萤的博客-CSDN博客
        // https://blog.csdn.net/qq_18369669/article/details/106317884
    </script>
</body>

</html>